﻿CREATE TABLE [dbo].[OrderLine] (
    [Id]              INT           IDENTITY (1, 1) NOT NULL,
    [OrdreNr]         INT           NOT NULL,
    [VareId]          NVARCHAR (20) NOT NULL,
    [VareBeskrivelse] NVARCHAR (50) NULL,
    [Enhedspris]      MONEY         NOT NULL,
    [Antal]           FLOAT (53)    NOT NULL,
    CONSTRAINT [PK_OrderLine] PRIMARY KEY CLUSTERED ([Id] ASC),
    CONSTRAINT [FK_OrderLine_Item] FOREIGN KEY ([VareId]) REFERENCES [dbo].[Item] ([VareId]),
    CONSTRAINT [FK_OrderLine_Order] FOREIGN KEY ([OrdreNr]) REFERENCES [dbo].[Order] ([OrdreNr])
);

